#include "Precompiled.h"

#include "../GameEngine/Bootstrapper.h"
#include "../GameEngine/GameEngine/GameEngine.h"

using namespace Game::GameEngine;

//--------------------------------------------------------------------------------------
// Initialize everything and go into a render loop
//--------------------------------------------------------------------------------------
int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) {
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
    Game::Bootstrapper* bootstrapper = new Game::Bootstrapper();
    GameEngine* gameEngine = new GameEngine();
    bootstrapper->SetGameEngine(gameEngine);
    int result = bootstrapper->Run();
    SAFE_DELETE(bootstrapper);
    SAFE_DELETE(gameEngine);
    return result;
}
